<?php

namespace app\share\model;


use think\Model;

class Task extends Model
{
    protected  $table = 'yan_test';
    protected $autoWriteTimestamp = true;
    public function test1()
    {
        $data['name'] = "小明";
        $data['age'] = 18;
        $this->data($data)->save();
        if($this->id)
        {
            return ['code'=>200, 'msg'=>"添加成功", 'data'=>['id'=>'数据id为'.$this->id]];
        }
    }
    public function testy2()
    {
        echo 123;die;
    }

}